package com.hh.demo.feignClient;

import com.hh.demo.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @author 黄浩
 * @create 2022-07-16 18:33
 */
@FeignClient(value = "service-user",fallbackFactory = UserFeignClientFallbackFactory.class)
@RequestMapping("/user")
public interface UserFeignClient {
    @RequestMapping(value = "tel/{tel}",method = RequestMethod.GET)
    JSONResult getUserByTel(@PathVariable("tel")String tel);
}
